/*
 * @Author: luthor luthor-li@qq.com
 * @Date: 2024-03-05 20:38:56
 * @LastEditors: fisher luthor-li@qq.com
 * @LastEditTime: 2024-07-22 17:43:59
 * @FilePath: \allfront\src\utils\fpstream\modules\Camera\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export default class {
  constructor(send2Ue, listen2Ue) {
    this.send2Ue = send2Ue;
    this.listen2Ue = listen2Ue;
    this.baseCmd = "/CameraManager";
  }
  setView(data = {}, cb) {
    this.send2Ue(`${this.baseCmd}/SetDesiredPosition`, data, cb);
  }
  getView(cb) {
    this.send2Ue(`${this.baseCmd}/GetPosition`, {}, cb);
  }
  focusActor(data = {}, cb) {
    this.send2Ue(`${this.baseCmd}/SetFocusActor`, data, cb);
  }
  playRoaming(data = {}, cb) {
    // 监听结束漫游回调,作为播放漫游的回调
    this.listen2Ue(`${this.baseCmd}/EndRoaming_CallBack`, cb);
    // 发送播放漫游指令
    this.send2Ue(`${this.baseCmd}/PlayRoaming`, data);
  }
  pauseRoaming(data = {}, cb) {
    // 发送播放漫游指令
    this.send2Ue(`${this.baseCmd}/StopRoaming`, data, cb);
  }
  resumeRoaming(data = {}, cb) {
    this.send2Ue(`${this.baseCmd}/ResumeRoaming`, data, cb);
  }
  endRoaming(data = {}, cb) {
    this.send2Ue(`${this.baseCmd}/EndRoaming`, data, cb);
  }
  getRoamingPoint(cb) {
    this.send2Ue(`${this.baseCmd}/GetRoamingPoint`, {}, cb);
  }
  splitScreen(data = {}, cb) {
    this.send2Ue(`${this.baseCmd}/SplitScreen`, data, cb);
  }
  cancleSplit(data = {}, cb) {
    this.send2Ue(`${this.baseCmd}/EndSplitScreen`, data, cb);
  }

  // focusActorById(data = {}, cb) {
  //   this.send2Ue(`${this.baseCmd}/SetFocusActor`, data, cb);
  // }
}
